home *** CD-ROM | disk | FTP | other *** search
/ New Star Software Collection / NSS_Collection.iso / 3-170 dbase 10 for windows / 1.ima / SAMPLES.PAK / PUZZLE.PRG < prev    next >
Text File  |  1993-07-26  |  3KB  |  71 lines

  1. *******************************************************************************
  2. *  PROGRAM:      Puzzle.prg
  3. *
  4. *  WRITTEN BY:   Borland Late Night Crew
  5. *
  6. *  DATE:         5/93
  7. *
  8. *  UPDATED:      7/93
  9. *
  10. *  VERSION:      Alpha α
  11. *
  12. *  DESCRIPTION:  This program uses the object model and some Windows API
  13. *                functions to create a simple puzzle game, a ray painter,
  14. *                and a line painter.
  15. *                It brings up a window with 3 pushbuttons, each corresponding
  16. *                to the objects above.  You can bring up as many instances
  17. *                of each object as you like.
  18. *                The Ray painter uses event handlers together with Windows
  19. *                painting functions to create different colored rays in the
  20. *                current window.  You can select the color of the rays by
  21. *                clicking on the appropriate combination of the RED, GREEN, and
  22. *                BLUE pushbuttons that appear both in the Ray painter and in
  23. *                the line painter.
  24. *                The line painter lets you paint different colored lines inside
  25. *                the current window.
  26. *
  27. *  PARAMETERS:   None
  28. *
  29. *  CALLS:        DeleteObject()
  30. *                SelectObject()
  31. *                CreatePen()
  32. *                GetDC()
  33. *                ReleaseDC()
  34. *                MoveTo()
  35. *                LineTo()
  36. *                SetTextColor()
  37. *                FillRect(  CPTR()
  38. *                CreateSolidBrush()
  39. *                * external functions
  40. *
  41. *
  42. *
  43. *  USAGE:        DO Puzzle
  44. *
  45. *******************************************************************************
  46. *
  47. * $Revision:   1.7  $
  48. *
  49.  
  50. set proc to sampproc
  51. set talk off
  52. public b,parent,p,globx,globy
  53.  
  54. * External function declarations
  55. extern pascal CWORD DeleteObject( CWORD )  "GDI.EXE"
  56. extern pascal CWORD SelectObject( CWORD, CWORD )  "GDI.EXE"
  57. extern pascal CWORD CreatePen( CWORD, CWORD, CLONG )  "GDI.EXE"
  58. extern pascal CWORD GetDC( CWORD )  "USER.EXE"
  59. extern pascal CWORD ReleaseDC( CWORD, CWORD )  "USER.EXE"
  60. extern pascal CWORD MoveTo(CWORD, CWORD, CWORD )  "GDI.EXE"
  61. extern pascal CWORD LineTo(CWORD, CWORD, CWORD )  "GDI.EXE"
  62. extern pascal CLONG SetTextColor( CWORD, CLONG )  "GDI.EXE"
  63. extern pascal CWORD FillRect( CWORD, CPTR, CWORD )  "USER.EXE"
  64. extern pascal CWORD CreateSolidBrush( CLONG )  "GDI.EXE"
  65.  
  66.  
  67. m = new MenuWindow()  && create the menu showing available objects
  68.  
  69.  
  70. ***************************** End of Puzzle.prg ********************************
  71.